package com.ruoyi.equ.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.equ.domain.EquExpire;
import com.ruoyi.equ.service.IEquExpireService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 设备到期信息Controller
 * 
 * @author luguanqing
 * @date 2020-10-26
 */
@RestController
@RequestMapping("/equ/expire")
public class EquExpireController extends BaseController
{
    @Autowired
    private IEquExpireService equExpireService;


    /**
     * 查询设备基本信息列表
     */
    @GetMapping("/list")
    public TableDataInfo list(EquExpire equExpire)
    {
        startPage();
        List<EquExpire> list = equExpireService.selectEquExpireList(equExpire, equExpire.getExpireState());
        return getDataTable(list);
    }

    /**
     * 查询设备基本信息列表
     */
    @GetMapping("/listAll")
    public AjaxResult listAll(EquExpire equExpire)
    {
        List<EquExpire> list = equExpireService.selectEquExpireList(equExpire, equExpire.getExpireState());
        return AjaxResult.success(list);
    }
}
